package com.aps.common.model.genetic;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author jsy
 * @description:工序时间区间内的信息
 * @date 2025/9/11 20:18
 */
@Schema(description = "工序时间区间")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProcessInterval implements Serializable {
    /**
     * 主键ID
     */
    private String id;
    /**
     * 订单工序ID
     */
    private String processId;
    /**
     * 开始时间
     */
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    private LocalDateTime endTime;
    /**
     * 订单中产品序号
     */
    private int productIndex;
    /**
     * 设备id
     */
    private String machineId;

    public ProcessInterval(String processId, LocalDateTime startTime, LocalDateTime endTime, int productIndex, String machineId) {
        this.processId = processId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.productIndex = productIndex;
        this.machineId = machineId;
    }
}
